<table>    
    <tr>
<?php
$col = 0;
$threads = $this->myThreads;
foreach( $threads as $thread ){    	 
    if ( ($col > 0) && ($col % 3 == 0) )
    {
        ?>
        </tr><tr>
        <?
    }
    ?>        
    <td>
        <div class="titre">  
        <?php
            if ( $thread['status'] == "on")
            {
                ?>
                <a class="changeStatusAjax" href="camera/detection?threadId=<?php echo $thread['id'];?>&action=pause" target="content">
                    Camera <?php echo $thread['id'] . " : " . $thread['name']; ?>
                </a>
                <img src="imgweb/webcam.png" />
                <?php                     
            } else {
                ?>
                <a class="changeStatusAjax" href="camera/detection?threadId=<?php echo $thread['id'];?>&action=start" target="content">
                    Camera <?php echo $thread['id'] . " : " . $thread['name']; ?>
                </a>
                <img src="imgweb/stop.png" />
                <?php
            }                    
        ?>
        </div> 

        <a class="lienAjax" href="camera?threadId=<?php echo $thread['id'];?>" target="content">
            <img class="vignette" src="<?php echo $thread['src']; ?>" width="320" height="240"/>
        </a>   
    </td>
    <?        
    $col++;  
}
?>
    </tr>
</table>
